Tanguy Ortolo: Debian: switch to UEFI boot
For those interested, here is a way to install Debian and boot it with UEFI
if you have an UEFI motherboard.
Using UEFI with Debian requires expert knowledge so if you do not feel up to
it, keep your BIOS system.
1 Background
UEFI is a specification for motherboard's firmwares which is replacing the old
BIOS. For now, UEFI motherboards still include a BIOS compatibility layer.
The UEFI boot process is quite different from the BIOS one. It involves one
specific piece of the motherboard's firmware, the UEFI Boot Manager, which is
able to load boot loaders from FAT file systems on specially-typed partitions.
It can offer a boot menu (boot: Debian from HDD, Windows from HDD, USB stick,
DVD?), which can be configured from a running operating system.
So, basically, to boot a system with UEFI, you need two things:
- to install an UEFI boot loader on a FAT-formated EFI System Partition;
- to tell the UEFI Boot Manager to create an entry for that boot loader.
- make your own, by installing an UEFI boot loader to an USB stick, which will load a regular installer kernel and initrd;
- use a regular BIOS installer image, using the compatibility mode of your motherboard.
# grub-install /dev/sdaThat will do three things:
- generate a GRUB image;
- install it to the EFI partition at efi/debian/grubx64.efi;
- try to configure the UEFI Boot Manager (the motherboard's boot menu) to load it on start-up
grub-install
again, which should now succeed to configure the UEFI
Boot Manager. Reboot to check that you get a debian entry on the motherboard's
boot menu, and remove efi/boot/bootx64.efi which is
no longer needed.